<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>水果成篮</title>
</head>

<body>
  <script>
    var dayOfTheWeek = function (day, month, year) {
      var myDate = new Date();
      myDate.setFullYear(year, month - 1, day);
      var weekday = ["7", "1", "2", "3", "4", "5", "6"]
      return weekday[myDate.getDay()]
    };
    console.log(dayOfTheWeek(18, 7, 1999))
  </script>
</body>

</html>